Rework the last delsel/electric fix.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Oct 2012 12:43:54 +0000 (08:43 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 22 Oct 2012 12:43:54 +0000 (08:43 -0400)
commit1d4d73e2a1b7f19c4d57596bca991c3dbf12bd1b
tree5e6fde0daffbfa24bf0172f7bb04aa70c68e1eb2
parent9a3ed701bed5e7c907f1875bfaa306ae5b5adc56
Rework the last delsel/electric fix.
* lisp/delsel.el (delete-selection-helper): Use a function instead of a hook.
(delete-selection-pre-hook): Use use-region-p.
(delete-selection-self-insert-function): Remove.
(self-insert-command): Obey self-insert-uses-region-functions.
(self-insert-iso): Revert to previous setting, since we don't actually
know what that command does.
(delete-selection-self-insert-hooks): Remove.
* lisp/electric.el (electric-pair-delete-selection-self-insert-function):
Rename to electric-pair-will-use-region, return a boolean.
(electric-pair-mode): Adjust accordingly.  Don't require delsel.
lisp/ChangeLog
lisp/delsel.el
lisp/electric.el